package com.xzc.refactory.method.replaceTempWithQuery;

public class C1 {
    int _quantity;
    int _itemPrice;

    double getPrice() {
        //希望替换到下面这2个临时变量
        int basePrice = _quantity * _itemPrice;
        double discountFactor;
        if (basePrice > 1000)
            discountFactor = 0.95;
        else
            discountFactor = 0.98;
        return basePrice * discountFactor;
    }
}
